<h2>Activity Cloud for <%= link_to @user.name, @user.url%> from <%=Time.now%></h2>
<span id='status'>Loaded 0 friends ...</span>&nbsp;&nbsp;<%= image_tag '/images/waiticon.gif', :id=>'waiticon'%><br/><br/>
<!-- set max number of friends then remove status when that number is reached-->
<% javascript_tag do -%>
  count = 0;
  <% @friends.each_with_index do |f, i|%>
  new Ajax.Request("<%= url_for :controller => :twitter, 
    :action => :user_image, :id => @user.twitter_id, :params => {:friend_id => f.friend_id, :refresh => @refresh, :number => i, :max => @friends.size} %>", { method:'get'});
  <% end %>
<% end -%>
<% @friends.each do |f|%>
<span id="user_image_<%= f.friend_id %>"></span>
<% end %>
<p/>
<%= link_to 'Ensure latest data is pulled from Twitter', :action=>'cloud', :id => nil, :params => {:refresh => 'true'}%><br/><br/>
<%= link_to 'Link you can share with friends', :id=>@user.twitter_id%>
